home *** CD-ROM | disk | FTP | other *** search
- property ancestor
-
- on new me, buttonName, castName, theChannel, theStageLoc, descendant
- if objectp(descendant) then
- ancestor = new(script("generic button"), buttonName, castName, theChannel, theStageLoc, descendant)
- else
- ancestor = new(script("generic button"), buttonName, castName, theChannel, theStageLoc, me)
- end if
- return me
- end
-
- on performFunction me
- global gResultsClassObj
- tell the stage
- playSFX(5)
- end tell
- txtObj = new(xtra("fileio"))
- if not objectp(txtObj) then
- alert("Couldn't open FILEIO Xtra.")
- else
- if the machineType <> 256 then
- else
- setFilterMask(txtObj, "All Files,*.*")
- end if
- pathAndFile = displayOpen(txtObj)
- updateStage()
- end if
- txtObj = 0
- if not voidp(pathAndFile) and (pathAndFile <> EMPTY) then
- fileContents = readTextFile(pathAndFile)
- if line 1 of fileContents <> "{RESULTS}" then
- alert("That file does not contain results data.")
- else
- delete line 1 of fileContents
- last = the number of lines in fileContents
- criteria = line 1 to 3 of fileContents
- hitList = value(line 4 of fileContents)
- titles = line 5 to last of fileContents
- setSearchResultsList(titles, hitList, criteria)
- end if
- end if
- end
-